import { RouteRecordRaw } from 'vue-router';
const defaultRoutes: RouteRecordRaw[] = [
	// 根路径重定向到主页
	{ name: 'root', path: '/', redirect: '/home' },
	// 主页
	{
		name: 'home',
		path: '/home',
		component: () => import('@/views/sys/home.vue'),
		meta: {
			title: '首页',
		},
	},
	// 登录页
	{ name: 'login', path: '/login', component: () => import('@/views/sys/login.vue') },
	{
		path: '/redirect',
		component: () => import('@/layout/index.vue'),
		children: [
			{
				path: '/redirect/:path(.*)',
				component: () => import('@/views/redirect/index.vue'),
			},
		],
	},
	// 403
	{ name: '403', path: '/403', component: () => import('@/views/sys/403.vue') },
	// 404
	{ name: '404', path: '/404', component: () => import('@/views/sys/404.vue') },
	// 500
	{ name: '500', path: '/500', component: () => import('@/views/sys/500.vue') },
];
export default defaultRoutes;
